% Dim Action If Not MNBoard.Founduser Then MNBoard.GoToerr(10) IF SESSION(CacheName& "MyGradeInfo")(37)="0" Then MNBoard.GoToErr(67) Action=Lcase(Request.querystring("Action")) If Len(Action)>10 then MNBoard.GoToerr(1) Select Case Action Case"del" DelPlacard Case Else Placard() End Select MNBoard.Footer() Set MNBoard =Nothing Sub DelPlacard() Dim ID ID=MNBoard.Checknum(request.querystring("ID")) IF MNBoard.MyAdmin=7 Then MNBoard.execute("Delete From [i_Placard] where ID="&ID&" and Name='"&MNBoard.MyName&"'") Else MNBoard.execute("Delete From [i_Placard] where ID="&ID&"") End IF MNBoard.Cache.clean("Placard") MNBoard.NetLog "删除公告" Response.redirect "Placard.asp" End Sub Sub Placard() Dim Caption,Content,Temp,TmpBoardID,S,Title,Rs,ID If MNBoard.BoardID>0 Then MNBoard.CheckBoard() IF MNBoard.MyAdmin=7 And MNBoard.IsBoardAdmin=False Then MNBoard.GoToErr(68) ID=MNBoard.Checknum(request("ID")) MNBoard.Head"Placard.asp?Action=Say&BoardID="&MNBoard.BoardID,MNBoard.BoardName,"发布公告" Caption=MNBoard.Fun.Checkbad(MNBoard.Fun.GetStr("caption")) Content=MNBoard.Fun.Checkbad(MNBoard.Fun.GetStr("Content")) IF Caption="" And Content="" Then Title="发布公告" TmpBoardID=MNBoard.BoardID If ID<>0 Then Set Rs=MNBoard.execute("select BoardID,Caption,Content,AddTime,Name,hits from [i_Placard] where ID="&ID&"") IF Not rs.eof Then Title="编辑公告" TmpBoardID=Rs(0) Caption=Rs(1) Content=Rs(2) If MNBoard.MyAdmin=7 Then If Lcase(MNBoard.MyName)<>Lcase(Rs(4)) Then MNBoard.GotoErr(73) End If Else MNBoard.Gotoerr(69) End If End If S="
" MNBoard.ShowTable Title,S AdminPlacard() Else TmpBoardID=MNBoard.Checknum(request("BoardID")) IF len(Content)>16200 or Len(Caption)>250 Then MNBoard.GoToErr(18) If MNBoard.Fun.CheckIsEmpty(Content) Then MNBoard.GoToErr(50) If MNBoard.Info(60)="1" Then Content=MNBoard.Fun.Replacehtml(Content) Temp=MNBoard.Fun.UbbString(Content) If ID<>0 Then Title="编辑公告" MNBoard.Execute("update [i_Placard] Set Caption='"&Caption&"',Content='"&Content&"',BoardID="&TmpBoardID&",UbbString='"&Temp&"' where ID="&ID) Else MNBoard.execute("insert into[i_Placard](Caption,Content,AddTime,Name,BoardID,UbbString)values('"&Caption&"','"&Content&"','"&MNBoard.NowBbsTime&"','"&MNBoard.MyName&"',"&TmpBoardID&",'"&Temp&"')") Title="发布公告" End If Content="